﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FileHelpers;
using Nebular.ExpenseManagement.Connector.Toolbox;

namespace Nebular.ExpenseManagement.Connector.EuroCard
{
    [IgnoreEmptyLines()]
    [FixedLengthRecord(FixedMode.AllowMoreChars)]
    public sealed class EurocardFileImport
    {

        [FieldFixedLength(16)]
        [MapTo("somewhere")]
        public String _serialNumber;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(17)]
        [MapTo("somewhere")]
        public String _cardNumber;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(27)]
        [MapTo("somewhere")]
        public String _name;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(8)]
        [MapTo("somewhere")]
        public String _date;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(3)]
        [MapTo("somewhere")]
        public String __expenseCategory;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(23)]
        [MapTo("somewhere")]
        public String _description;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(14)]
        [MapTo("somewhere")]
        public String _city;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(26)]
        [MapTo("somewhere")]
        public String _country;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(26)]
        [MapTo("somewhere")]
        public String _mCCDescription;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(5)]
        [MapTo("somewhere")]
        public String _mCCCode;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(3)]
        [MapTo("somewhere")]
        public String _currency;

        [FieldFixedLength(1)]
        [MapTo("somewhere")]
        public Int32 _amountDecimals;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(13)]
        [MapTo("somewhere")]
        public String _amount;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(14)]
        [MapTo("somewhere")]
        public String _unknown;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(23)]
        [MapTo("somewhere")]
        public String _sourceTransactionID;

        [FieldTrim(TrimMode.Right)]
        [FieldFixedLength(2)]
        [MapTo("somewhere")]
        public String _billedCategory;
        


    }
}
